<?php
session_start();
$_SESSION['data'] = array_merge($_POST,$_SESSION['data']);
if($_SERVER['HTTP_REFERER'] !='http://localhost/nb158jk/session_form/b.php') {
  header("location:a.php");
}

?>
<form action="d.php" method="post">

<table border="1" align="center">
  <thead>
    <tr>
      <th colspan="2">Please fill the details : Part 3</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Select Gender</td>
      <td>
        <label><input type="radio" name="gender" value="m" />Male</label>
        <label><input type="radio" name="gender" value="f" />Female</label>

      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" value="Save" /></td>
    </tr>
  </tbody>
</table>

</form>
